<?php

class timeListener extends Doctrine_Record_Listener {
	public function preInsert(Doctrine_Event $e) {
		$current = time();
		$e->getInvoker()->modified_time = $current;
		$e->getInvoker()->created_time = $current; 
	}
	
	public function preUpdate(Doctrine_Event $e) {
		$e->getInvoker()->modifed_time = time();
	}
}